import lib.problem as problem
import math

class Problem016(problem.Problem):
	def __init__(self):
		problem.Problem.__init__(self, 16)
		
	def solve(self):
		s = str(int(math.pow(2, 1000)))
		
		sum = 0
		for c in s:
			sum += int(c)
			
		return sum

	
if __name__ == "__main__":
	print(Problem016().solveAndTime())